<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/include/TLDInclude.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ include file="/WEB-INF/include/meta.jsp"%>
<title>组内奖品录入</title>
<link href="${ctx}/css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${ctx}/js/select-ui.min.js"></script>
<script type="text/javascript" src="${ctx}/js/My97DatePicker/WdatePicker.js"></script>


<script type="text/javascript">
$(document).ready(function(e) {
    $(".select1").uedSelect({
		width : 345			  
	});
	$(".select2").uedSelect({
		width : 167  
	});
	$(".select3").uedSelect({
		width : 100
	});
	
});


function checkdata(){
	  if ($("#inputid1").val() == '' || $("#inputid2").val() == '' || $("#inputid3").val() == '' || $("#inputid4").val() == '') {
		  alert("带*的值必须录入");
		  return false;
	  }
	return true;
}


</script>

</head>

<body>
<c:if test="${not empty msg}">
			<div id="message" style="color: red;" align="center">
				${msg}
			</div>
</c:if>
	
	
	<c:if test="${empty msg}">
			

	
	
	
    
    <div class="formbody">
    
    <div class="formtitle"><span>组内奖品录入</span></div>
    <form:form action="${ctx}/leprize/update" method="post" modelAttribute="entity" >
    <input type=hidden name="id"  value="${entity.id}"/>
    <input type=hidden name="levelId"  value="${alevel.id}"/>
    
     <ul class="forminfo">
    <c:if test="${empty entity.id}">
    
   
     <li><label>选择奖品<b>*</b></label>  
    <div class="vocation">
    <select id="inputid1" name="prizeId" class="select1">
    <c:forEach items= "${prizes}" var="maste">
    <option value="${maste.id}"
     <c:if test= "${entity.prizeId eq maste.id}">
                                                         selected="selected "
                                                 </c:if>
    >${maste.prizeName}</option>
    </c:forEach>
    </select>
    </div>
    
    
    </c:if>
    
    
    <li><label>奖品总共数量<b>*</b></label><input id="inputid2" name="prizeNumber"  onKeyDown="checkkey(this.value,event)" type="text" value="${entity.prizeNumber}" class="dfinput" /><i>(投进去的实际奖品数量 0为没奖品)</i></li>
    <li><label>每人最多数量<b>*</b></label><input id="inputid3" name="idMax" onKeyDown="checkkey(this.value,event)"  type="text" value="${entity.idMax}" class="dfinput" /><i>(该奖品在该组中每人最多拥有数量 0为不限制)</i></li>
    <li><label>每人最少数量<b>*</b></label><input id="inputid4" name="idMin" onKeyDown="checkkey(this.value,event)"  type="text" value="${entity.idMin}" class="dfinput" /><i>(该奖品在该组中每个最少拥有数量 0为不限制)</i></li>
    
    <li><label>&nbsp;</label><input name="" type="submit" onclick="javascript:return checkdata()" class="btn" value="确认保存"/></li>
    </ul>
    
    </form:form>
    </div>

</c:if>
</body>

</html>
